import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/login",
    name: "login",
    meta: {
      title: "登录",
    },
    component:()=>import('../views/loginPage')
  },
  {
    path: "/error",
    name: "error",
    meta: {
      title: "error",
    },
    component:()=>import('../views/error.vue')
  },
  {
    path: "/homePage",
    name: "homePage",
    meta: {
      title: "首页",
    },
    component: () => import("../views/homePage"),
  },
  {
    path: "/navModule",
    name: "navModule",
    meta: {
      title: "标签页",
    },
    component: () => import("../views/navModule"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
